<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var date = new Date(1132324234242)
    console.log(date)

    // 时间戳
    var date1 = new Date()
    var date2 = new Date("2033-03-03")
    var timeStamp1 = Date.now()
    var timeStamp2 = date1.getTime()
    var timeStamp3 = date2.getTime()

    console.log(timeStamp1, timeStamp2, timeStamp3)
    console.log(+date1)

    var startTime = Date.now()
    for (var i = 0; i < 100000; i++) {
      console.log(i)
    }
    var endTime = Date.now()
    console.log("执行100000次for循环打印耗时:", endTime - startTime)


  </script>
</body>

</html>